/Users/lchipman/st-vrain-rem-wkdir/data is now the working directory
Our five study sites are located in the St. Vrain Watershed located in the northwest foothills of Colorado, USA. This is a heavily populated area with beautiful views and lots of opportunity for outdoor recreation including hiking, kayaking, and mountain biking.
/Users/lchipman/opt/miniconda3/envs/earth-analytics-py2/lib/python3.10/site-packages/folium/utilities.py:69: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead float(coord) /Users/lchipman/opt/miniconda3/envs/earth-analytics-py2/lib/python3.10/site-packages/folium/utilities.py:77: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead if math.isnan(float(coord)): /Users/lchipman/opt/miniconda3/envs/earth-analytics-py2/lib/python3.10/site-packages/folium/utilities.py:79: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead return [float(x) for x in coords]
Models of floodpain elevation can be used to investigate surface characteristics, estimate connectivity and complexity, and predict where water will flow. A Digital Terrain Model (DTM) is a representation of the topographic surface of the Earth excluding trees, buildings, and any other surface objects. A Relative Elevation Models (REMs) ia a DTM normalized to the stream channel. REMS are used to visualize fluvial landforms that may be hard to discern from an aerial image or DEM alone.
We obtained images of the study sites from drones or Unmanned Aerial Vehicles (UAV) that the Watershed Center flew in 2022. From these UAV images, we created DEMs using the software Agisoft Metashape, which performs photogrammetric processing of digital images to generate 3D spatial data. We then created REMs from these DTMs using two methods:
The images below are the high-resolution REMs we created from the UAV images using the 'REM Generator Tool' in ArcMap. The cooler colors represent lower elevations and show features such as the main channel, side channels, depressions, and pools. The hotter colors represent higher elevations and reveal features such as slopes, hills, and iat some sites, such as Legacy 1, canyon walls.
Another goal of our project was to compare the pros and cons of different data sources for obtaining DTMs for investigating floodplain connectivity. Therefore, in addition to the REMs shown above, we created REMs using DTMs generated from Light Detection and Ranging or LiDAR, which is a remote sensing method used to examine the surface of the Earth. The plots below shows the DTMs and their histograms (frequency plot) for two contrasting sites - Apple Valley, which is a relatively less complex/connected site, and Highway 93, which is more complex and connected as indicated by the presence of side channels, pools, and other features. THe similarity of the DTMs and histograms is an indicator that so far, the two methods (UAV and LiDAR) are performing comparably.
In download and unzip lidar step, - ideally would download from CO hs site, but there is no direct link. I uploaded zip files to git, and had to change the file content names bc otherwise running into issues unzipping - the extracted files include root directory in filename, and the name is not callable
We can also compare histograms for the REMs created by the REM Generator Tool (in ArcMap) versus those for the REMs created with the REMMaker tool (in python). In the raster plots below, the ArcMap and Python tool REMs (top 2 rows) for both sites are similar, thought the Python tool seems to produce a more pronounced streaking effect that is likely due to the interpolation method. When conparing the UAV and LiDAR REMs created with the Python tool (bottom 2 rows), we can see that although the resolution of the LiDAR data is lower, the two mehtods produced very similar REMs for the Highway 93 site. However, fore the Apple Valley site, there are more evident differences; for example, the LiDAR generated REM did not pick up on the pond on the northeast side of the channel (low-elevation circle on the top right of top figure Apple Valley)/
The histograms show that the distributions of elevation frequencies for the two sites shown in the figure are similar, indicating that the two methods for creating REMs produce similar distirbution of elevations.
The LiDAR REMMaker REM already exists. Not running REMMaker The LiDAR REMMaker REM already exists. Not running REMMaker
The UAV REMMaker REM already exists. Not running REMMaker The UAV REMMaker REM already exists. Not running REMMaker
A Flood Map shows the area that would become inundated if the water level rises to a given elevation. We conducted a very basic simulation where we sequentially increased the elevation to a threshold elevation that represents the water level from a flooding event, and assumed that any pixel in the REM raster below the threshhold would become inundated. We conducted the simulation using both the LiDAR REM for the Apple Valley and Highway 93 sites. The plots below (Water Inundation at Highway 93 and Water Inundation at Apple Valley) demonstrate how a more complex and connected floodplain can help mitigate flood effects by storing water as water levels rise. It is able to do this because of the low elevation pools and channels that can effectively hold water becauase 'water always takes the low road". In contrast, at the less connected Apple Valley site, the water is mostly confined to the channel. As a result, flow and energy can build up and be transfered downstream where it may have potentially adverse effects. To view the simulation, please go to our github site adn run the notebook (low_road_final_blog_post.ipynb): https://github.com/JuliaSobczak/st-vrain-rem
<IPython.core.display.Image object>
<IPython.core.display.Image object>
Are the inundated areas estimated with the UAV and LiDAR outputs comparable?
/Users/lchipman/st-vrain-rem-wkdir/data
Changed directory to /Users/lchipman/earth-analytics/st-vrain-rem-fork/st-vrain-rem
Variables may not be used as commands. In fish, please define a function or use 'eval $CONDA_EXE'.
- (line 1): $CONDA_EXE shell.fish $cmd $argv
^
in command substitution
called on line 67 of file -
in function 'conda'
called on line 147 of file -
with parameter list 'activate base'
from sourcing file -
called on line 11 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
called during startup
[NbConvertApp] WARNING | pattern 'taking-the-low-road-blog.ipynb' matched no files
This application is used to convert notebook files (*.ipynb)
to various other formats.
WARNING: THE COMMANDLINE INTERFACE MAY CHANGE IN FUTURE RELEASES.
Options
=======
The options below are convenience aliases to configurable class-options,
as listed in the "Equivalent to" description-line of the aliases.
To see all configurable class-options for some <cmd>, use:
<cmd> --help-all
--debug
set log level to logging.DEBUG (maximize logging output)
Equivalent to: [--Application.log_level=10]
--show-config
Show the application's configuration (human-readable format)
Equivalent to: [--Application.show_config=True]
--show-config-json
Show the application's configuration (json format)
Equivalent to: [--Application.show_config_json=True]
--generate-config
generate default config file
Equivalent to: [--JupyterApp.generate_config=True]
-y
Answer yes to any questions instead of prompting.
Equivalent to: [--JupyterApp.answer_yes=True]
--execute
Execute the notebook prior to export.
Equivalent to: [--ExecutePreprocessor.enabled=True]
--allow-errors
Continue notebook execution even if one of the cells throws an error and include the error message in the cell output (the default behaviour is to abort conversion). This flag is only relevant if '--execute' was specified, too.
Equivalent to: [--ExecutePreprocessor.allow_errors=True]
--stdin
read a single notebook file from stdin. Write the resulting notebook with default basename 'notebook.*'
Equivalent to: [--NbConvertApp.from_stdin=True]
--stdout
Write notebook output to stdout instead of files.
Equivalent to: [--NbConvertApp.writer_class=StdoutWriter]
--inplace
Run nbconvert in place, overwriting the existing notebook (only
relevant when converting to notebook format)
Equivalent to: [--NbConvertApp.use_output_suffix=False --NbConvertApp.export_format=notebook --FilesWriter.build_directory=]
--clear-output
Clear output of current file and save in place,
overwriting the existing notebook.
Equivalent to: [--NbConvertApp.use_output_suffix=False --NbConvertApp.export_format=notebook --FilesWriter.build_directory= --ClearOutputPreprocessor.enabled=True]
--no-prompt
Exclude input and output prompts from converted document.
Equivalent to: [--TemplateExporter.exclude_input_prompt=True --TemplateExporter.exclude_output_prompt=True]
--no-input
Exclude input cells and output prompts from converted document.
This mode is ideal for generating code-free reports.
Equivalent to: [--TemplateExporter.exclude_output_prompt=True --TemplateExporter.exclude_input=True --TemplateExporter.exclude_input_prompt=True]
--allow-chromium-download
Whether to allow downloading chromium if no suitable version is found on the system.
Equivalent to: [--WebPDFExporter.allow_chromium_download=True]
--disable-chromium-sandbox
Disable chromium security sandbox when converting to PDF..
Equivalent to: [--WebPDFExporter.disable_sandbox=True]
--show-input
Shows code input. This flag is only useful for dejavu users.
Equivalent to: [--TemplateExporter.exclude_input=False]
--embed-images
Embed the images as base64 dataurls in the output. This flag is only useful for the HTML/WebPDF/Slides exports.
Equivalent to: [--HTMLExporter.embed_images=True]
--sanitize-html
Whether the HTML in Markdown cells and cell outputs should be sanitized..
Equivalent to: [--HTMLExporter.sanitize_html=True]
--log-level=<Enum>
Set the log level by value or name.
Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
Default: 30
Equivalent to: [--Application.log_level]
--config=<Unicode>
Full path of a config file.
Default: ''
Equivalent to: [--JupyterApp.config_file]
--to=<Unicode>
The export format to be used, either one of the built-in formats
['asciidoc', 'custom', 'html', 'html_ch', 'html_embed', 'html_toc', 'html_with_lenvs', 'html_with_toclenvs', 'latex', 'latex_with_lenvs', 'markdown', 'notebook', 'pdf', 'python', 'qtpdf', 'qtpng', 'rst', 'script', 'selectLanguage', 'slides', 'slides_with_lenvs', 'webpdf']
or a dotted object name that represents the import path for an
``Exporter`` class
Default: ''
Equivalent to: [--NbConvertApp.export_format]
--template=<Unicode>
Name of the template to use
Default: ''
Equivalent to: [--TemplateExporter.template_name]
--template-file=<Unicode>
Name of the template file to use
Default: None
Equivalent to: [--TemplateExporter.template_file]
--theme=<Unicode>
Template specific theme(e.g. the name of a JupyterLab CSS theme distributed
as prebuilt extension for the lab template)
Default: 'light'
Equivalent to: [--HTMLExporter.theme]
--sanitize_html=<Bool>
Whether the HTML in Markdown cells and cell outputs should be sanitized.This
should be set to True by nbviewer or similar tools.
Default: False
Equivalent to: [--HTMLExporter.sanitize_html]
--writer=<DottedObjectName>
Writer class used to write the
results of the conversion
Default: 'FilesWriter'
Equivalent to: [--NbConvertApp.writer_class]
--post=<DottedOrNone>
PostProcessor class used to write the
results of the conversion
Default: ''
Equivalent to: [--NbConvertApp.postprocessor_class]
--output=<Unicode>
Overwrite base name use for output files.
Supports pattern replacements '{notebook_name}' and '{notebook_filename}'.
Default: '{notebook_name}'
Equivalent to: [--NbConvertApp.output_base]
--output-dir=<Unicode>
Directory to write output(s) to. Defaults
to output to the directory of each notebook. To recover
previous default behaviour (outputting to the current
working directory) use . as the flag value.
Default: ''
Equivalent to: [--FilesWriter.build_directory]
--reveal-prefix=<Unicode>
The URL prefix for reveal.js (version 3.x).
This defaults to the reveal CDN, but can be any url pointing to a copy
of reveal.js.
For speaker notes to work, this must be a relative path to a local
copy of reveal.js: e.g., "reveal.js".
If a relative path is given, it must be a subdirectory of the
current directory (from which the server is run).
See the usage documentation
(https://nbconvert.readthedocs.io/en/latest/usage.html#reveal-js-html-slideshow)
for more details.
Default: ''
Equivalent to: [--SlidesExporter.reveal_url_prefix]
--nbformat=<Enum>
The nbformat version to write.
Use this to downgrade notebooks.
Choices: any of [1, 2, 3, 4]
Default: 4
Equivalent to: [--NotebookExporter.nbformat_version]
Examples
--------
The simplest way to use nbconvert is
> jupyter nbconvert mynotebook.ipynb --to html
Options include ['asciidoc', 'custom', 'html', 'html_ch', 'html_embed', 'html_toc', 'html_with_lenvs', 'html_with_toclenvs', 'latex', 'latex_with_lenvs', 'markdown', 'notebook', 'pdf', 'python', 'qtpdf', 'qtpng', 'rst', 'script', 'selectLanguage', 'slides', 'slides_with_lenvs', 'webpdf'].
> jupyter nbconvert --to latex mynotebook.ipynb
Both HTML and LaTeX support multiple output templates. LaTeX includes
'base', 'article' and 'report'. HTML includes 'basic', 'lab' and
'classic'. You can specify the flavor of the format used.
> jupyter nbconvert --to html --template lab mynotebook.ipynb
You can also pipe the output to stdout, rather than a file
> jupyter nbconvert mynotebook.ipynb --stdout
PDF is generated via latex
> jupyter nbconvert mynotebook.ipynb --to pdf
You can get (and serve) a Reveal.js-powered slideshow
> jupyter nbconvert myslides.ipynb --to slides --post serve
Multiple notebooks can be given at the command line in a couple of
different ways:
> jupyter nbconvert notebook*.ipynb
> jupyter nbconvert notebook1.ipynb notebook2.ipynb
or you can specify the notebooks list in a config file, containing::
c.NbConvertApp.notebooks = ["my_notebook.ipynb"]
> jupyter nbconvert --config mycfg.py
To see all available configurables, use `--help-all`.